import request from '@/utils/request'

// 验证码登录
export function login(data) {
  return request({
    url: '/auth/login/phoneAndCodeLogin',
    method: 'post',
    data
  })
}

// 账号密码登录
export function loginFormByPass(data) {
  return request({
    url: '/auth/login/login',
    method: 'post',
    data
  })
}

// 账号密码登录
export function loginUrl(data) {
  return request({
    url: '/auth/login/loginUrl',
    method: 'post',
    data
  })
}

// 发送验证码
export function sendSms(data) {
  return request({
    url: '/auth/login/sendSms/' + data,
    method: 'post'
  })
}

// getInfo
export function getInfo(token) {
  return request({
    url: '/auth/login/info',
    method: 'get',
    params: { token }
  })
}

// 登出
export function logout() {
  return request({
    url: '/auth/login/layout',
    method: 'post'
  })
}
